package com.zpark.springbootcondition.config;

import com.zpark.springbootcondition.condtion.CLassCondition;
import com.zpark.springbootcondition.domain.User;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Conditional;
import org.springframework.context.annotation.Configuration;

@Configuration
public class UserConfig {

    @Bean
    @Conditional(CLassCondition.class)//自己定义的条件
    public User user(){
        return new User();
    }
}
